<!--
	作者：495246490@qq.com
	时间：2016-04-25
	描述：参数文案列表
-->
<h3>{{rootColumnName}}
    <small>{{rootColumnPrompt}}</small>
</h3>
<div class="btn-group">
    <button class="btn btn-primary big-big-font" ui-sref="cms.hotTopic">问答</button>
    <button class="btn btn-default big-big-font" ui-sref="cms.hotContest">擂台</button>
</div>
<div  ng-controller="hotTopicCtrl" class="panel panel-default">
    <div class="col-sm-6">
        <div class="panel-heading">
            <form class="form-inline">
                <div class="form-group">
                    <label for="">{{fieldSearch}} : </label>
                    <select class="custom-css form-control"  ng-model="fieldSelectValue" ng-change="dataChange()" ng-options="fieldSelectValue._value_ for fieldSelectValue in realmList" >
                    </select>
                </div>
            </form>
        </div>
    </div>
    <div class="panel-body " ng-class="loading?'whirl standard':'' " style="border-top: 1px solid #CFDBE2;">
        <table class="table table-striped table-condensed">
            <thead>
            <tr>
                <th>标题</th>
                <th>作者</th>
                <th>发布时间</th>
                <th>排序</th>
                <th>插队</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <!-- repeat begin -->
            <tr ng-repeat=" topicItem in topicList ">
                <td title="{{topicItem.title}}">{{topicItem.title | limitToNum : 20}}</td>
                <td>{{topicItem.userInfo.user.name | null_value_filter}}</td>
                <td>{{topicItem.createTime}}</td>
                <td>
                    <a tooltip="升序" tooltip-trigger="mouseenter" class="btn btn-xs btn-danger" ng-click="fnSort(topicItem.topicId,1)"><i class="fa fa-long-arrow-up"></i></a>
                    <a tooltip="降序" tooltip-trigger="mouseenter" class="btn btn-xs btn-success" ng-click="fnSort(topicItem.topicId,2)"><i class="fa fa-long-arrow-down"></i></a>
                </td>
                <td>
                    <a tooltip="手动排序" tooltip-trigger="mouseenter" class="btn btn-xs btn-default" ng-show="true" ng-click="fnSortNum(topicItem.topicId,topicItem.sort,dataLength)"><i class="fa fa-sort"></i></a>
                </td>
                <td>
                    <a tooltip="查看" tooltip-trigger="mouseenter" class="btn btn-xs btn-primary" ui-sref="cms.topicDetail({ size : turnPage.itemsPerPage, page : turnPage.currentPage, sortType : sortSelectValue.sortType, type : fieldSelectValue.type, topicId : topicItem.topicId })"><i class="fa fa-eye"></i></a>
                    <button tooltip="移除热门" tooltip-trigger="mouseenter" class="btn btn-xs btn-warning" ng-click="removeHotToPic(topicItem.topicId)"><i class="fa fa-trash-o"></i></button>
                </td>
            </tr>
            <!-- repeat end -->
            </tbody>
        </table>
        <p style="display: inline-block; margin:21px 0;height: 30px;line-height: 30px;"> 显示 <strong>{{turnPage.totalItems}}</strong> 条中的 <strong>{{turnPage.itemsPerPage*(turnPage.currentPage-1)+1}}-{{ToNum}}</strong> 条</p>
        <pagination class="pull-right" first-text="{{turnPage.firstText}}" previous-text="{{turnPage.previousText}}" next-text="{{turnPage.nextText}}" last-text="{{turnPage.lastText}}" total-items="turnPage.totalItems" ng-model="turnPage.currentPage" max-size="turnPage.maxSize"
                    num-pages="numPages" boundary-links="true" ng-change="dataChange()" class="pagination-sm">
        </pagination>
    </div>
</div>